<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/Function Info.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>WinXPrint_Page</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style3 {font-size: medium}
-->
</style>

<link href="../../WinXStyles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	font-size: x-large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style2 {
	font-size: large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head>

<body>
<h1 class="style1"><img src="../../WinX48.png" width="48" height="48" align="absmiddle"> <!-- InstanceBeginEditable name="title" -->WinXPrint_Page<!-- InstanceEndEditable --></h1>
<hr>

<!-- InstanceBeginEditable name="Prototype" -->
<p>WinXPrint_Page (hPrinter, hWnd, x, y, cxLog, cyLog, cxPhys, cyPhys, pageNum, pageCount)</p>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="Description" -->
<p>Prints a page </p>
<!-- InstanceEndEditable -->
<table width="80%" border="1" cellpadding="0" cellspacing="0">
  <tr bgcolor="#CCCCCC">
    <th width="24%"><span class="style3">Parameter</span></th>
    <th width="76%"><span class="style3">Description</span></th>
  </tr>
  <!-- InstanceBeginRepeat name="Parameter Table" --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->hPrinter<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The handle to the printer DC to use. To get a printer DC handle user the WinXPrint_Start function <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->hWnd<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The handle to the window to print from <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->x<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The x coordinate on the window to print from <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->y<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The y coordinate on the window to print from <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->cxLog<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The width in window units to print <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->cyLog<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The height in window units to print <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->cxPhys<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The width in printer units to print <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->cyPhys<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The height in printer units to print <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->pageNum<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The page number<!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->pageCount<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The total number of pages <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
</table>
<h3>Returns</h3>
<!-- InstanceBeginEditable name="Return Info" -->
<p>$$TRUE on success or $$FALSE on fail </p>
<!-- InstanceEndEditable -->
<h3>Remarks</h3>
<!-- InstanceBeginEditable name="Remarks" -->
<p>If this function returns $$FALSE and there are still more pages to print, you should call <a href="WinXPrint_Done.htm">WinXPrint_Done</a> and not print the remaining pages.</p>
<p>WinXPrint_Page works by playing the Auto Draw records of the specified window into the printer DC, resizing them to match the printer resolution. Margins and clipping to the printable area are handled automatically.</p>
<p>Because the on screen and on paper formats tend to vary, you may want to create an invisible window to store the Auto Draw commands and print from that instead of printing from your main window. </p>
<!-- InstanceEndEditable -->
<h3>Examples</h3>
<table width="80%"  border="0">
  <tr>
    <td bgcolor="#C6C6FF"><!-- InstanceBeginEditable name="Example Code" --><span class="codeStyle">'print the contents of a window on a single page <br>
hPrinter = WinXPrint_Start (1, 1, 1, -1, @cxPhys, @cyPhys, &quot;Printing Test&quot;, $$TRUE, #hMain)<br>
WinXPrint_Page (hPrinter, #hMain, 0, 0, 400, 300, cxPhys, cyPhys, 1, 1)<br>
WinXPrint_Done (hPrinter) </span><!-- InstanceEndEditable --></td>
  </tr>
</table>

<h2 class="style2">Related Links</h2>
<!-- InstanceBeginEditable name="Related Links" -->
<p><a href="../../WinX%20Programmer%27s%20Guide/Auto%20Draw.htm/Printing.htm">Printing</a><br>
  <a href="WinXPrint_Start.htm">WinXPrint_Start</a><br>
<a href="WinXPrint_Done.htm">WinXPrint_Done</a></p>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
